<template>
  <div class="bg_fff">
      <el-form :inline="true" class="p5">
        <el-form-item label="时间:">
          <div class="block">
            <el-date-picker
              v-model="value"
              type="datetimerange"
              :picker-options="pickerOptions"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              align="right">
            </el-date-picker>
          </div>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">查询</el-button>
        </el-form-item>
    </el-form>
    <div class="p10">
      <el-table
        :data="tableData"
        stripe
        border
        style="width: 100%">
        <el-table-column
          prop="date"
          label="流水编号"
        >
        </el-table-column>
        <el-table-column
          prop="name"
          label="出账钻石"
        >
        </el-table-column>
        <el-table-column
          prop="address"
          label="操作时间">
        </el-table-column>
        <el-table-column
          prop="address"
          label="变化前钻石">
        </el-table-column>
        <el-table-column
          prop="address"
          label="变化后钻石">
        </el-table-column>
        <el-table-column
          prop="address"
          label="业务数据">
        </el-table-column>
      </el-table>
    </div>
    <div class="block p20 tac">
      <el-pagination
        :page-size="10"
        background
        layout="total, prev, pager, next, jumper"
        @current-change='handleCurrentChange'
        :total="400">
      </el-pagination>
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        region:'',
        pickerOptions: {
          shortcuts: [{
            text: '最近一周',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近一个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近三个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit('pick', [start, end]);
            }
          }]
        },
        value:'',
        tableData:[]
      };
    },
    methods: {
      onSubmit(tab, event) {
        console.log(tab, event);
      },
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
      }
    }
  };
</script>
<style lang='less' scoped> 

</style>